struct DistanceSensor
    type::Symbol
end
DistanceSensor() = DistanceSensor(:generic)

type(::Type{DistanceSensor}) = :distance_sensor
function distance(dev::Device{DistanceSensor})
    @ccall lib.wb_distance_sensor_get_value(dev.tag::Ptr{WbDeviceTag})::Cdouble
end

function maxvalue(dev::Device{DistanceSensor})
    @ccall lib.wb_distance_sensor_get_max_value(dev.tag::Ptr{WbDeviceTag})::Cdouble
end

function minvalue(dev::Device{DistanceSensor})
    @ccall lib.wb_distance_sensor_get_min_value(dev.tag::Ptr{WbDeviceTag})::Cdouble
end

sensortype(dev::Device{DistanceSensor}) = dev.kind.type